<template>
    <div class="app-container">
        <!-- 基础信息 -->
        <h5 class="titleInfo">
            基础信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="姓名">
                        <span class="spanToInput">{{list.realname | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="手机号">
                        <span class="spanToInput">{{list.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="级别">
                        <span class="spanToInput">{{list.roleId | roleFn}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="加盟金额">
                        <span class="spanToInput">{{list.amount | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="交钱分公司">
                        <span class="spanToInput">{{list.branchName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="账户类型">
                        <span class="spanToInput">{{list.type | accountType}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="合同时间">
                        <span class="spanToInput">{{list.signTime | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="团队">
                        <span class="spanToInput">{{list.team | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="招商地区">
                        <!-- <span class="spanToInput">{{list.province}}{{list.city}}{{list.area}}</span> -->
                        <el-cascader
                            class="wuwu"
                            placeholder="暂无"
                            :options="options"
                            v-model="selectedOptions">
                        </el-cascader>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 推荐人信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            推荐人信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="推荐人姓名">
                        <span class="spanToInput">{{list.refereeUser | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="推荐人手机号">
                        <span class="spanToInput">{{list.refereePhone | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 实名认证信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            实名认证信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="证件类型">
                        <span class="spanToInput">{{list.identityType | cardNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="证件号码">
                        <span class="spanToInput">{{list.identity | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 银行卡信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            银行卡信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row v-for="(val,index) in list.bankCards" :key="index">
                <el-col :span="12">
                    <el-form-item label="开户行">
                        <span class="spanToInput">{{val.name | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="银行卡号">
                        <span class="spanToInput">{{val.card | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row  v-if="!list.bankCards">
                <el-col :span="12">
                    <el-form-item label="开户行">
                        <span class="spanToInput">暂无</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="银行卡号">
                        <span class="spanToInput">暂无</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 实名认证信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            实名认证信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="真实姓名">
                        <span class="spanToInput">{{list.identity | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="证件类型">
                        <span class="spanToInput">{{list.identityType | cardNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="证件号码">
                        <span class="spanToInput">{{list.identity | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <!-- 支付信息 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            支付信息
        </h5>
        <el-form class="form" ref="form"   label-width="130px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="订单号">
                        <span class="spanToInput">{{list.orderSn | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="支付时间">
                        <span class="spanToInput">{{list.orderTime | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="支付状态">
                        <span class="spanToInput">{{list.payStatus | payStatusType}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="支付方式">
                        <span class="spanToInput">{{list.payGenre | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="加盟费">
                        <span class="spanToInput">{{list.payGenre | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="券码抵扣金额">
                        <span class="spanToInput">{{list.ticketAmount | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="保证金">
                        <span class="spanToInput">{{list.guaranteeAmount | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="实付金额">
                        <span class="spanToInput">{{list.price | filterNull}}</span>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </div>
</template>
<script>
import {mmkElectronicDetail} from '@/api/designerAudit'
export default {
    name:"designerAuditInfo",
    data(){
        return {
            userId:null,
            list:{},
            options: [],
            selectedOptions:[]
        }
    },
    filters:{
        filterNull(e) {
            if(!e){
                return "暂无"
            }else{
                return e
            }
        },
        cardNull(e){
            return window.helper.cardType(String(e))
        },
        userFocus(e){
            return window.helper.userFocus(String(e))
        },
        roleFn(e){
            return window.helper.roleFn(String(e))
        },
        accountType(e){
            return window.helper.accountType(String(e))
        },
        payStatusType(e){
            return window.helper.payStatusType(String(e))
        }
    },
    created(){
        this.userId = Number(this.$route.query.userId)
        let datas={
            id : this.userId
        }
        mmkElectronicDetail(datas).then(res=>{
            this.list = res.data.data
            this.selectedOptions=[
                this.list.province,
                this.list.city,
                this.list.area
            ]
            
            console.log(res)
        })
    },
    mounted(){
        // 省市区数据获取
        var addData = require('../../../../static/address/area.json')
        this.options = addData
    }
}
</script>
<style scoped>
.app-container{padding: 0px!important}

</style>
